package com.dreamthen.dao;


import com.dreamthen.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @Author zengms
 * @Date 2023-10-22 10:29:57
 **/
public interface IUserDao {

    @Select("select * from user where id = #{id}")
    User getUser(String id);

    @Insert("insert into user(id,name,age,balance) values (#{id},#{name},#{age},#{balance})")
    void add(User user);

    @Update("update user set age=#{age} where id = #{id}")
    void updateUser(User user);

    @Delete("delete from user where id = #{id}")
    void delUser(String id);
}
